#include<iostream>
#include<vector>
#include<queue>
using namespace std;
struct TreeNode
{
	int val;
	struct TreeNode* left;
	struct TreeNode* right;
	TreeNode(int x) :
		val(x), left(NULL), right(NULL) 
	{}
};
class Solution {
public:
	vector<int> PrintFromTopToBottom(TreeNode* root) {
		vector<int> nums;
		if (!root)
			return nums;
		queue<TreeNode*> q;
		q.push(root);
		while (!q.empty())
		{
			nums.push_back(q.front()->val);
			if (q.front()->left)
				q.push(q.front()->left);
			if (q.front()->right)
				q.push(q.front()->right);
			q.pop();
		}
		return nums;
	}
};
int main()
{
	return 0;
}